<%@ page language="java" import="java.util.*,cn.biwysh.exam.entity.User" pageEncoding="utf-8"%>
<%@page import="cn.biwysh.exam.entity.Category,cn.biwysh.exam.entity.Uscore"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
User user = null;
if (session.getAttribute("userqt") != null) {
	user = (User) session.getAttribute("userqt");
}else{
	response.sendRedirect("index.do");
}
List<Category> list=null;
if(request.getAttribute("list")!=null){
	list=(List<Category>)request.getAttribute("list");
}
List<Uscore> scores=null;
if(request.getAttribute("scores")!=null){
	scores=(List<Uscore>)request.getAttribute("scores");
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>个人信息</title>
    <link href="css/qt/self.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src='dwr/engine.js'>
        </script>
		<script type="text/javascript" src='dwr/util.js'>
        </script>
		<script type="text/javascript" src="script/jquery/jquery-1.5.1.min.js">
        </script>
        <script type="text/javascript" src='dwr/interface/SelfDwr.js'>
        </script>
        <script type="text/javascript" src="script/util.js">
        </script>
        <script type="text/javascript" src="script/qt/self.js">
        </script>
    <script type="text/javascript">
    var uid=<%=user.getId()%>;
    var scorecount=<%=scores==null?0:scores.size()%>;
    </script>
  </head>
  
  <body>
    <div id="mainleft"><img src="img/qt/mainleft.jpg" style="width:100%;height:100%;"/></div>
     <div id="main">
      <div id="top">
            <jsp:include page="title.jsp" flush="true">
             <jsp:param name="jspName" value="self" />
           </jsp:include>
           <div class="clear"></div>
       </div>
       <div id="tgTXT">
           <div id="tiao" style=""></div>
           <div id="mainbg">
             <div id="usershow">
                <div class="titlebg"><div class="titletxt">基本资料</div></div>
                <div class="clear"></div>
                <table id="tblshow" cellpadding="0" cellspacing="0">
                 <tr>
                   <td class="sign">姓名：</td><td class="txt" style="width: 120px;"><%=user.getUname()%></td>
                   <td class="sign">部门：</td><td class="txt" style="width: 120px;"><%=user.getName()%></td>
                   <td class="sign1">角色：</td><td class="txt"><%=user.getRole()%></td>
                 </tr>
                 <tr id="selfext">
                   <td class="sign">电话：</td><td class="txt" style="width: 120px;"><span id="utel"></span></td>
                   <td class="sign">邮箱：</td><td class="txt" style="width: 120px;"><span id="uemail"></span></td>
                   <td class="sign1">地址：</td><td class="txt"><span id="uaddress"></span></td>
                 </tr>
                  <tr>
                   <td colspan="2" style="text-align:left;padding-left:22px;"><a href="#" style="color:black;" onclick="editPwd();return false;">修改密码</a></td>
                   <td colspan="2" style="text-align:left;padding-left:22px;"><a href="#" style="color:black;" onclick="editSelf();return false;">完善个人资料</a></td>
                   <td class="sign"></td><td class="txt"></td>
                 </tr>
                </table>
             </div>
              <div id="usershow" style="margin-top:10px;">
                <div class="titlebg"><div class="titletxt">已考核信息</div></div>
                <div class="clear"></div>
                <table id="khshow" cellpadding="0" cellspacing="0">
                  <%if(scores!=null){
                	  for(int i=(scores.size()-1);i>-1;i--){ %>
                		 <tr><td class="khtr"><a style="text-decoration: none;color:black;" href="lskh.do?id=<%=scores.get(i).getEid() %>&back=self"><%=(scores.size()-i) %>、<%=scores.get(i).getName() %></a></td></tr>
                 <%	  }
                  } %>
                </table>
             </div>
             <div id="usershow" style="margin-top:10px;">
                <div class="titlebg"><div class="titletxt">自定义知识库</div></div>
                <div class="clear"></div>
                <div class="zdyzsk">
                  <%if(list!=null){
                	  for(int i=0;i<list.size();i++){ %>
                		  <div class="cate"><a style="text-decoration: none;color:black;" target="_blank"  href="zslist.do?cid=<%=list.get(i).getId() %>"><%=list.get(i).getName() %></a></div>
                 <%	  }
                  } %>
                  <div class="clear"></div>
                </div>
             </div>
           </div>
           <div id="mainbottom"></div>
       </div>
       <div id="editpanel" class="editpanel">
       <div class="uzuo"></div>
       <div class="uzhong">
           <table id="edittbl" style="margin-top:30px;display:none;" cellpadding="0" cellspacing="0">
              <tr><td class="ptitle" colspan="2"><div class="ptitle1">修改密码</div></td></tr>
              <tr><td style="font-size: 12px;width:60px;text-align:right;height:30px;">旧密码：</td><td style=""><input id="oldpwd" type="password" style="width:150px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="font-size: 12px;text-align:right; height:30px;">新密码：</td><td style=""><input id="pwd" type="password"  style="width:150px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="font-size: 12px;text-align:right; height:30px;">确认密码：</td><td style=""><input id="repwd" type="password"  style="width:150px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="height:50px;" colspan="2"><img src="img/qt/baocun.jpg"/ class="button" onclick="UpdatePwd()"><img style="margin-left:20px;" src="img/qt/quxiao.jpg"/ class="button" onclick="closeEdit()"></td></tr>
           </table>
           <table id="selftbl" style="margin-top:30px;display:none;" cellpadding="0" cellspacing="0">
              <tr><td class="ptitle2" colspan="2"><div class="ptitle21">完善个人资料</div></td></tr>
              <tr><td style="font-size: 12px;width:60px;text-align:right;height:30px;">电话：</td><td style=""><input id="tel" style="width:200px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="font-size: 12px;text-align:right; height:30px;">邮箱：</td><td style=""><input id="email" style="width:200px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="font-size: 12px;text-align:right; height:30px;">住址：</td><td style=""><input id="address" style="width:200px;border:solid 1px #E1E1E1;text-align:left;"/></td></tr>
              <tr><td style="height:50px;" colspan="2"><img src="img/qt/baocun.jpg"/ class="button" onclick="UpdateSelf()"><img style="margin-left:20px;" src="img/qt/quxiao.jpg"/ class="button" onclick="closeEdit()"></td></tr>
           </table>
       </div>
       <div class="uyou"></div>
	   </div>
      <div id="footht" style=""></div>
      <div id="footer">
		  <jsp:include page="footer.jsp" flush="true"></jsp:include>
	   </div>
     </div>
     <div id="mainright"><img src="img/qt/mainright.jpg" style="width:100%;height:100%;"/></div>
  </body>
</html>
